package com.lemt.mall.mapper;

import com.lemt.mall.entity.ShoppingCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zik
 * @since 2023-09-10
 */
public interface ShoppingCartMapper extends BaseMapper<ShoppingCart> {

    ShoppingCart selectDelete(Integer cartId,Integer isDelete);
    List<ShoppingCart> getListById(Integer id);

    @Update("update  shopping_cart set is_delete = 0 where id = #{cartId};")
    int reBackCart(Integer cartId);

}
